Skip to content

Conversation

romash1408
Copy link

Closes #2

@romash1408
Copy link
Author

romash1408 commented Dec 21, 2017

I see now that there should be ability to throw errors from .json.js for callback er, or Promise catch, becose now unhandled promises looks in console like
image
Also, try with console.error gives
image
something strange in the middle of webpack output, whithout filename and string of error.
Maybe add error argument to resolve callback, so in .json.js it will look like this?

var fs = require('fs')

module.exports = function(resolve) {
    fs.readdir(__dirname, (err, files) => {
        if (err) return resolve(err)

        // ...

        resolve(null, data)
    })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant